package com.binest.investDetails.service.impl;

import java.util.List;
import com.binest.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.binest.investDetails.mapper.InvestDetailsMapper;
import com.binest.investDetails.domain.InvestDetails;
import com.binest.investDetails.service.IInvestDetailsService;

/**
 * 投资详情Service业务层处理
 * 
 * @author binest
 * @date 2024-01-18
 */
@Service
public class InvestDetailsServiceImpl implements IInvestDetailsService 
{
    @Autowired
    private InvestDetailsMapper investDetailsMapper;

    /**
     * 查询投资详情
     * 
     * @param id 投资详情主键
     * @return 投资详情
     */
    @Override
    public InvestDetails selectInvestDetailsById(String id)
    {
        return investDetailsMapper.selectInvestDetailsById(id);
    }

    @Override
    public List<InvestDetails> selectInvestDetailsListByInId(String inclousionId) {
        return investDetailsMapper.selectInvestDetailsListByInId(inclousionId);
    }

    /**
     * 查询投资详情列表
     * 
     * @param investDetails 投资详情
     * @return 投资详情
     */
    @Override
    public List<InvestDetails> selectInvestDetailsList(InvestDetails investDetails)
    {
        return investDetailsMapper.selectInvestDetailsList(investDetails);
    }

    /**
     * 新增投资详情
     * 
     * @param investDetails 投资详情
     * @return 结果
     */
    @Override
    public int insertInvestDetails(InvestDetails investDetails)
    {
        investDetails.setCreateTime(DateUtils.getNowDate());
        return investDetailsMapper.insertInvestDetails(investDetails);
    }

    /**
     * 修改投资详情
     * 
     * @param investDetails 投资详情
     * @return 结果
     */
    @Override
    public int updateInvestDetails(InvestDetails investDetails)
    {
        investDetails.setUpdateTime(DateUtils.getNowDate());
        return investDetailsMapper.updateInvestDetails(investDetails);
    }

    /**
     * 批量删除投资详情
     * 
     * @param ids 需要删除的投资详情主键
     * @return 结果
     */
    @Override
    public int deleteInvestDetailsByIds(String[] ids)
    {
        return investDetailsMapper.deleteInvestDetailsByIds(ids);
    }

    /**
     * 删除投资详情信息
     * 
     * @param id 投资详情主键
     * @return 结果
     */
    @Override
    public int deleteInvestDetailsById(String id)
    {
        return investDetailsMapper.deleteInvestDetailsById(id);
    }
}
